/*
 ============================================================================
 Name		: LemonAssistantAppUi.h
 Author	  : 
 Copyright   : Your copyright notice
 Description : Declares UI class for application.
 ============================================================================
 */

#ifndef __LEMONASSISTANTAPPUI_h__
#define __LEMONASSISTANTAPPUI_h__

// INCLUDES
#include <aknappui.h>
#include <aknviewappui.h>
#include <aknnavide.h> 
#include <akntabobserver.h> 
#include <akntabgrp.h> 

#include "UIManager.h"
#include "LAError.h"

// FORWARD DECLARATIONS
class CLemonAssistantAppView;
class CLogoView;
class CMainView;
class CStraightLightView;
class CStrLightSettingView;
class CFlashLightView;
class CFlashLightSettingView;
class CVibraMassagerView;
class CHelpView;
// CLASS DECLARATION
/**
 * CLemonAssistantAppUi application UI class.
 * Interacts with the user through the UI and request message processing
 * from the handler class
 */
class CLemonAssistantAppUi : public CAknViewAppUi,MAknTabObserver
	{
public:
	// Constructors and destructor
	void ConstructL();
	CLemonAssistantAppUi();
	virtual ~CLemonAssistantAppUi();

private:
	// Functions from base classes
	void HandleCommandL(TInt aCommand);
	void HandleResourceChangeL( TInt aType );
	TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
	void HandleStatusPaneSizeChange();
	
	void TabChangedL(TInt aIndex);
	
public:
	void ActivateAndRecordViewL(TInt aPreId,TInt aActiveId);
	void BackPreViewL();
	
	void SetCommandSetL(TInt aResourceId);
	
	void LAError(const TLMErrInfo& aInfo,const TLMErrState& aState);
	
	CUIManager* GetUI();
	
private:
	void CreateTable(TInt aActiveIndex = 0);
	void ReleaseTable();

private:
	// Data
	//CLemonAssistantAppView* iAppView;
	CLogoView* iLogoView;
	CMainView* iMainView;
	CStraightLightView* iStrLight;
	CStrLightSettingView* iStrLightSetting;
	CFlashLightView* iFlashLight;
	CFlashLightSettingView* iFlashLightSetting;
	CVibraMassagerView* iMassager;
	CHelpView* iHelp;
	
	CUIManager* iUIMgr;
	
    CAknNavigationDecorator*        iNaviDecorator;
    TInt aPreViewId;
	};

inline CUIManager* OKCUI()
	{
	return STATIC_CAST(CLemonAssistantAppUi*,CEikonEnv::Static()->AppUi())
	->GetUI();
	}
;
#endif // __LEMONASSISTANTAPPUI_h__
// End of File
